package com.myf.entities;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.myf.typeHandlers.JsonbTypeHandler;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Data
@TableName(value="whs_material",autoResultMap = true)
public class MaterialEntity extends BaseEntity {
    @TableId(type = IdType.AUTO)
    public Integer id;

    public String code;

    public String name;

    @TableField("\"desc\"")
    public String desc;

    public short category;

    public String spec;

    public float length;

    public float width;

    public float height;

    /// 供应商
    public String vendor;

    @TableField("measurement_unit")
    public String measurementUnit;

    @TableField("safty_quantity")
    public float saftyQuantity;

    @TableField("alert_quantity")
    public float alertQuantity;

    @TableField("current_quantity")
    public float currentQuantity;
    /// 温度
    public float temperature;

    /// 湿度
    public float humidity;

    public short status;

    @TableField(typeHandler = JsonbTypeHandler.class)
    public String attributes;
}
